import 'package:flutter/material.dart';
import 'package:interesting_quiz/pages/quiz_page.dart';

class LandingPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new Material(
      color: Colors.indigoAccent[100],
      child: new InkWell(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.end,
          children: <Widget>[
            new Expanded(
              flex: 5,
              child: new Column(
                mainAxisAlignment: MainAxisAlignment.center, //将下面两个文本在纵轴上居中
                //verticalDirection: VerticalDirection.down,
                children: <Widget>[
                  new Text(
                    'Do You Know ?',
                    //设置文本字体、颜色和倾斜
                    style: new TextStyle(
                      fontSize: 38.0,
                      color: Colors.white,
                      fontWeight: FontWeight.bold,
                    ),
                  ),
                  new Padding(
                    //这个文本和上一个文本之间有个10像素的距离
                    padding: const EdgeInsets.only(top: 30.0),
                    child: new Text(
                      'Tap To Start',
                      //设置文本字体、颜色和倾斜
                      style: new TextStyle(
                        fontSize: 25.0,
                        color: Colors.white,
                        fontWeight: FontWeight.bold,
                        //fontStyle: FontStyle.italic
                      ),
                    ),
                  ),
                ],
              ),
            ),
            new Expanded(
              child: new Center(
                child: new Text(
                  '@Xusj',
                  textAlign: TextAlign.end,
                  //设置文本字体、颜色和倾斜
                  style: new TextStyle(
                      fontSize: 20.0,
                      color: Colors.white,
                      fontWeight: FontWeight.bold,
                      fontStyle: FontStyle.italic),
                ),
              ),
            )
          ],
        ),
        onTap: () {
          Navigator.push(context, new MaterialPageRoute(builder: (context) {
            return new QuizPage();
          }));
        },
      ),
    );
  }
}
